import _Form from "choerodon-ui/pro/lib/form";
import _TextArea from "choerodon-ui/pro/lib/text-area";
import _TextField from "choerodon-ui/pro/lib/text-field";
import _DataSet from "choerodon-ui/pro/lib/data-set";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";

/**
 * @since 2019-12-22
 */
import React from 'react';
import { Header, Content } from 'components/Page';
import intl from 'utils/intl';
import { detailFormDS } from "../../stores/missPermissionRecordDS";

var MissPermissionRecord = /*#__PURE__*/function (_React$Component) {
  _inherits(MissPermissionRecord, _React$Component);

  var _super = _createSuper(MissPermissionRecord);

  function MissPermissionRecord(props) {
    var _this;

    _classCallCheck(this, MissPermissionRecord);

    _this = _super.call(this, props);
    _this.detailFormDS = new _DataSet(detailFormDS);
    return _this;
  }

  _createClass(MissPermissionRecord, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var params = this.props.match.params;
      var permissionCheckId = params.permissionCheckId;
      this.detailFormDS.setQueryParameter('permissionCheckId', permissionCheckId);
      this.detailFormDS.query();
    }
  }, {
    key: "render",
    value: function render() {
      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
        title: intl.get('ciam.missPermission.view.title.detail').d('缺失权限详情'),
        backPath: "/ciam/miss-permission-record/list"
      }), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(_Form, {
        dataSet: this.detailFormDS,
        labelLayout: "horizontal",
        columns: 3,
        pristine: true
      }, /*#__PURE__*/React.createElement(_TextField, {
        name: "permissionCode"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "serviceName"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "apiPath"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "checkState"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "checkStateMeaning"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "apiMethodMeaning"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "permissionType"
      }), /*#__PURE__*/React.createElement(_TextField, {
        name: "creationDate"
      }), /*#__PURE__*/React.createElement(_TextArea, {
        newLine: true,
        colSpan: 2,
        rows: 3,
        name: "routeDetails",
        resize: "both"
      }), /*#__PURE__*/React.createElement(_TextArea, {
        newLine: true,
        colSpan: 2,
        rows: 7,
        name: "permissionDetails",
        resize: "both"
      }), /*#__PURE__*/React.createElement(_TextArea, {
        newLine: true,
        colSpan: 2,
        rows: 7,
        name: "userDetails",
        resize: "both"
      }))));
    }
  }]);

  return MissPermissionRecord;
}(React.Component);

export { MissPermissionRecord as default };